-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New mobject: ImplicitSurface for implicit 3D surface rendering #4429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New mobject: ImplicitSurface for implicit 3D surface rendering #4429
Conversation
Generating test codes and examples to create an isosurface by simply providing f(x, y, z).
for more information, see https://pre-commit.ci
I noticed that the tests are failing in my PR (#4429), but this is also happening in other recent PRs. It seems to be an issue with the CI environment rather than something directly related to my ImplicitSurface implementation. Could you please confirm if I should wait until the pipeline is fixed? |
Hi and thanks for your contribution!
Taking a look at the errors on the pipelines, the main issue in this case is that Manim can't find the To add this dependency, run |
…tta/manim into feature/implicit-surface
- Implemented ImplicitSurface class using Marching Cubes for isosurface rendering - Added type hints to implicit_surface.py - Fixed mypy typing issues in autoaliasattr_directive.py and file_ops.py - Updated conduct.md documentation
autoaliasattr_directive
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! I added the original ImplicitFunction feature with help from @/jared-hughes 's package: isosurfaces that was made for manim both 2D and 3D, which means the dependency is already used rather than adding the larger scikit-image. Could you attempt to use that instead? We wouldn't want to bloat manim.
Overview: What does this pull request change?
Adds a new
ImplicitSurface
mobject for rendering 3D surfaces defined by implicit equations of the formf(x, y, z) = 0
.Motivation and Explanation: Why and how do your changes improve the library?
Currently, Manim supports explicit and parametric surfaces (
Surface
,ParametricSurface
), but there is no direct way to visualize surfaces defined implicitly.This PR introduces
ImplicitSurface
, which:x_range
,y_range
, andz_range
.skimage.measure.marching_cubes
) to extract the zero level-set as a triangular mesh.VGroup
of polygons that integrates seamlessly with Manim’s 3D rendering pipeline.This directly addresses feature request #4428.
Further Information and Comments
Example render of
ImplicitSurface
in action:Reviewer Checklist